﻿using System;
using System.Collections.Generic;
using System.Text;
using Query2Object;

namespace CodeG
{
    class Program
    {
        static void Main(string[] args)
        {
            EntityProvider ep = new EntityProvider();
            Console.Write("Input Save Dir Path:");
            string SavePath = Console.ReadLine();
            Console.Write("Input NameSpace:");
            string Ns = Console.ReadLine();
            if (SavePath.EndsWith("\\"))
            {
                SavePath += Ns + "_Entitys.cs";
            }
            else
            {
                SavePath += "\\" + Ns + "_Entitys.cs";
            }
            Console.WriteLine("-------------------------code output start------------------------");
            string code = ep.CreateCode(SavePath, Ns);
            Console.Write(code);
            Console.WriteLine("-------------------------code output end  ------------------------");
            Console.WriteLine("Finished!\r\nPress to exit");
            Console.ReadLine();
        }
    }
}
